package com.hafu.util;

public class StringUtil {
    public static boolean isEmpty(String str) {
        return str == null || str.trim().length() == 0;
    }
public static void main(String[] args){
        //情况1
        String s1=null;
        //情况2
        String s2="";
        System.out.println((s2));
        System.out.println((s1));
        System.out.println(isEmpty(s1));
        System.out.println(isEmpty(s2));
    }
}

